package com.dfbz.demo04_匿名内部类;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo01_匿名内部类问题引出 {
    public static void main(String[] args) {

        AClass aClass=new AClass();
        aClass.method();
        System.out.println("-----------");

        BClass bClass=new BClass();
        bClass.method();


    }
}

class BClass implements Print{

    @Override
    public void method() {
        System.out.println("我输出的是bbbbb");
    }
}

class AClass implements Print{

    @Override
    public void method() {
        System.out.println("我输出的是aaa");
    }
}

interface Print{
    void method();
}